/*
 * @Author: 谢子健 1075010289@qq.com
 * @Date: 2024-09-21 23:32:07
 * @LastEditors: 谢子健 1075010289@qq.com
 * @LastEditTime: 2024-09-21 23:39:52
 * @FilePath: \ilink-vue-frontend\src\api\study\studyTree.ts
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
// src/api/study/studyTree.ts

/**
 * 获取学习树的详细信息
 * @param id 学习树 ID
 * @returns 学习树详情
 */

// studyTreeApi.ts
import { api } from '@/api/api';

interface FetchStudyTreeParams {
  id: string;
}

export async function fetchStudyTreeApi(params: FetchStudyTreeParams) {
  try {
    const response = await api.get('/java/teacher/study_tree_json/detail', { params });
    return response;
  }
  catch (error) {
    throw new Error('获取学习树数据失败');
  }
}
